GtkGrid: Add a few NULL checks
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jul 2015 22:38:30 +0000 (18:38 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jul 2015 22:38:59 +0000 (18:38 -0400)
Coverity complained about these.

gtk/gtkgrid.c

index 1b821b22d02daa3894b42fe8027a14853c241aeb..b12af752f52dad7541343816a5d2b1d7489455c7 100644 (file)
@@ -1127,8 +1127,11 @@ gtk_grid_request_sum (GtkGridRequest *request,
       nat -= linedata->spacing;
     }
 
-  *minimum = min;
-  *natural = nat;
+  if (minimum)
+    *minimum = min;
+
+  if (natural)
+    *natural = nat;
 }
 
 /* Computes minimum and natural fields of lines.